From: Norbert Manthey Date: Fri, 26 Feb 2021 14:41:37 +0000 (+0100) Subject: xenstore: check formats of trace X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~842 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=4a27a6786573067e69566afd2534edb2814de014;p=xen.git xenstore: check formats of trace When passing format strings to the trace function, allow gcc to analyze those and warn on issues. Signed-off-by: Norbert Manthey Reviewed-by: Thomas Friebel Reviewed-by: Julien Grall Reviewed-by: Juergen Gross Release-Acked-by: Ian Jackson --- diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_core.h index 589699e833..0c9a0961b5 100644 --- a/tools/xenstore/xenstored_core.h +++ b/tools/xenstore/xenstored_core.h @@ -217,7 +217,7 @@ int delay_request(struct connection *conn, struct buffered_data *in, /* Tracing infrastructure. */ void trace_create(const void *data, const char *type); void trace_destroy(const void *data, const char *type); -void trace(const char *fmt, ...); +void trace(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void dtrace_io(const struct connection *conn, const struct buffered_data *data, int out); void reopen_log(void); void close_log(void);